1. /* getdbl.cpp by K.Tsuru */
  2. /****************
  3. double type
  4. skip ' ' and ','
  5. *****************/
  6. #include "getnum.h"
  7. #include <string>
  8. using namespace std;
  9. double GetDouble(){
  10. string buff;
  11. char c;
  12. while(1) {
  13. if((c = getchar())== '\n') break;
  14. if(c==' '||c==',') continue;
  15. buff.append(1, c);
  16. }
  17. return atof(buff.c_str());
  18. }

getdbl.cpp : last modifiled at 2017/02/26 16:30:38(355 bytes)
created at 2016/04/11 11:17:20
The creation time of this html file is 2017/10/07 10:54:15 (Sat Oct 07 10:54:15 2017).